
import VueRouter from 'vue-router'
import About from '../pages/About'
import Home from '../pages/Home'
import Message from '../pages/Message'
import News from '../pages/News'
import Detail from '../pages/Detail'

export default new VueRouter({
    routers:[
        {
            path:"/about",
            component:About,
        },
        {
            path:"/home",
            component:Home,
            children:[
                {
                    path:"message",
                    component:Message,
                    children:[
                        {
                            name:"xiangqing",
                            path:"detail/:id/:title",
                            component:Detail,
                            props(route){
                                return {
                                    id:route.params.id,
                                    title:route.params.title,
                                }
                            },
                        }
                    ]
                },
                {
                    path:"news",
                    component:News
                },
            ]
        },
    ]
})
